package com.csun.cmny.provider.model.domain;

import com.csun.cmny.core.mybatis.BaseEntity;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import javax.persistence.Column;
import javax.persistence.Table;
import java.math.BigDecimal;
import java.util.Date;

@Data
@Table(name = "cn_omc_oldman_bill")
public class OmcOldManBill extends BaseEntity {
    /**
     * 组织Id
     */
    @Column(name = "group_id")
    private Long groupId;

    /**
     * 老人Id
     */
    @Column(name = "old_man_id")
    private Long oldManId;

    /*老人名字*/
    @Column(name = "old_man_name")
    private String oldManName;

    /**
     * 缴费单号
     */
    @Column(name = "bill_number")
    private String billNumber;

    /**
     * 账单类型 1.入院账单 2.出院账单 3.调整账单 4.周期账单 5.需审批账单
     */
    @Column(name = "bill_type")
    private Integer billType;

    /**
     * 是否已缴费 0.未缴费 1.已缴费
     */
    @Column(name = "is_pay")
    private Integer isPay;

    /**
     * 是否已缴费 0.未缴费 1.已缴费
     */
    @Column(name = "is_passed")
    private Integer isPassed;

    /**
     * 周期账单是否确认 1-已确认 0-未确认
     */
    @Column(name = "is_confirm")
    private Integer isConfirm;

    /**
     * 应交合计
     */
    @Column(name = "total_pay")
    private BigDecimal totalPay;

    /**
     * 预缴费用
     */
    @Column(name = "advance_pay_fee")
    private BigDecimal advancePayFee;

    /*入院时间*/
    private String inDate;

    /**
     * 缴费时间
     */
    @Column(name = "pay_time")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date payTime;

    /**
     * 押金编号
     */
    @Column(name = "cash_pledge_num")
    private String cashPledgeNum;

    /**
     * 预缴周期
     */
    @Column(name = "advance_cycle")
    private Long advanceCycle;

    /**
     * 备注
     */
    private String remark;

    /*床位编号*/
    @Column(name = "bed_no")
    private String bedNo;

    /*房间编号*/
    @Column(name = "room_no")
    private String roomNo;
}